import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/department/list',
    method: 'post',
    data: query
  })
}

export function departmentDetail(id) {
  return request({
    url: '/department/' + id,
    method: 'get',
  })
}

export function deleteDepartment(query) {
  return request({
    url: '/department/deleteDepartment',
    method: 'post',
    data: query
  })
}

export function createDepartment(query) {
  return request({
    url: '/department/createDepartment',
    method: 'post',
    data: query
  })
}

export function updateDepartment(query) {
  return request({
    url: '/department/updateDepartment',
    method: 'post',
    data: query
  })
}
